﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VISS.API.Users {

    /// <summary>
    /// This interface is used for VISS.VN
    /// Used this interface to implement operations on UserGeneralProfile table
    /// </summary>
    public interface IUserGeneralProfile {

        /// <summary>
        /// Updates the without blast.
        /// </summary>
        /// <param name="item">The UserGeneralProfileEnt item.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        bool UpdateWithoutBlast(UserGeneralProfileEnt item);
        /// <summary>
        /// Updates the blast.
        /// </summary>
        /// <param name="item">The UserGeneralProfileEnt item.</param>
        /// <returns>Return true if success, otherwise return false</returns>
        bool UpdateBlast(UserGeneralProfileEnt item);
        /// <summary>
        /// Updates the blast.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="blast">The blast.</param>
        /// <returns>
        /// Return true if success, otherwise return false
        /// </returns>
        bool UpdateBlast(string userKey, string blast);

        /// <summary>
        /// Gets by user key.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <returns>Return UserGeneralProfileEnt if exists, otherwise return null</returns>
        UserGeneralProfileEnt GetByUserKey(string userKey);

        /// <summary>
        /// Increases the archive point.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="archivePointNCT">The archive point NCT.</param>
        /// <param name="archivePoint">The archive point.</param>
        /// <param name="leftPoint">The left point.</param>
        /// <returns>
        /// Return true if success, otherwise return false
        /// </returns>
        bool IncreaseArchivePoint(string userKey, int archivePointNCT, out int archivePoint, out int leftPoint);
        //bool IncreaseImageCount(string userKey, out int imageCount);
        //bool IncreaseImageCount(string userKey, int imageCountNCT,  out int imageCount);
        //bool IncreaseTrusted(string userKey, out int trusted);

        /// <summary>
        /// Decreases the archive point.
        /// </summary>
        /// <param name="userKey">The user key.</param>
        /// <param name="archivePointNCT">The archive point NCT.</param>
        /// <param name="archivePoint">The archive point.</param>
        /// <returns>
        /// Return true if success, otherwise return false
        /// </returns>
        bool DecreaseArchivePoint(string userKey, int archivePointNCT, out int archivePoint);
        //bool DecreaseLeftPoint(string userKey, int leftPointNCT, out int leftPoint);
        //bool DecreaseImageCount(string userKey, out int imageCount);
        //bool DecreaseImageCount(string userKey, int imageCountNCT, out int imageCount);
        // bool DecreaseTrusted(string userKey, out int trusted);

        /// <summary>
        /// Quicks search.
        /// </summary>
        /// <param name="srhItem">The UserSrhEnt item.</param>
        /// <param name="orderBy">The order by type.</param>
        /// <param name="page">The page number.</param>
        /// <param name="recordPerPage">The record per page.</param>
        /// <param name="totalRecord">The total record.</param>
        /// <returns>
        /// Return list of UserSrhResEnt if having records match search conditions, otherwise return empty list
        /// </returns>
        List<UserSrhResEnt> QuickSearch(UserSrhEnt srhItem, EUserQuickSearchOrderType orderBy, int page, int recordPerPage, out int totalRecord);

        /// <summary>
        /// Gets random 6 most favorite user profiles.
        /// </summary>
        /// <param name="gender">The gender.</param>
        /// <returns>Return a list of user profile</returns>
        List<UserSrhResEnt> GetMostFavoriteRandom(EUserGender gender);

        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Quicks search for noel event.
        /// </summary>
        /// <param name="srhItem">The UserSrhEnt item.</param>
        /// <param name="orderBy">The order by.</param>
        /// <param name="page">The page number.</param>
        /// <param name="recordPerPage">The record per page.</param>
        /// <param name="totalRecord">The total record.</param>
        /// <returns>
        /// Return list of UserSrhResEnt if having records match search conditions, otherwise return empty list
        /// </returns>
        List<UserSrhResEnt> QuickSearchForNoelEvent(UserSrhEnt srhItem, EUserQuickSearchOrderType orderBy, int page, int recordPerPage, out int totalRecord);
    }
}
